package fr.norsys.mapper.console.utils;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import fr.norsys.mapper.console.exception.URLEncoderUtilException;

public class URLEncoderUtil {
	public static String escape(String aURLFragment) {
		String result = null;
		try {
			result = URLEncoder.encode(aURLFragment, "UTF-8");
		} catch (UnsupportedEncodingException ex) {
			throw new URLEncoderUtilException("UTF-8 not supported", ex);
		}
		return result;
	}
}
